package com.mocai.merchant.mapper;

import com.mocai.merchant.core.mapper.BaseMapper;
import com.mocai.merchant.model.Menu;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MenuMapper extends BaseMapper<Menu, Integer> {
    List<Menu> findByUserId(Integer userId);

    int deleteUserMenus(Integer userId);

    int addUserMenus(@Param("userId") Integer userId, @Param("menuIds") Integer[] menuIds);
}